Deblocking filtering control for illumination compensation

ABSTRACT

A deblocking filtering control involves deciding whether to apply deblocking filtering to sample values in a sample block in a picture and in a neighboring sample block in the picture based on i) whether illumination compensation is enabled for sample prediction values in a first prediction block in a reference picture for said sample block and/or ii) whether illumination compensation is enabled for sample prediction values in a second prediction block in said reference picture or another reference picture for said neighboring sample block. The sample block and the neighboring sample block are separated in the picture by a block boundary. This decision to apply deblocking filtering based on whether illumination compensation is enabled reduces blocking artefacts that may otherwise arise in certain pictures of a video sequence.

This application is a 35 U.S.C. § 371 national phase filing ofInternational Application No. PCT/EP2018/066577, filed Jun. 21, 2018,which claims the benefit of U.S. Provisional Application No. 62/528,645,filed Jul. 5, 2017, the disclosures of which are incorporated herein byreference in their entireties.

TECHNICAL FIELD

The present embodiments generally relate to deblocking filtering, and inparticular to control of deblocking filtering of sample values of asample block in a picture when illumination compensation is used.

BACKGROUND

Most video coding standards are built based on block-based predictionand transform coding. Pictures in a video sequence to be encoded aredivided into sample blocks as base units for prediction. There aremainly two prediction methods: spatial prediction, also referred to asintra prediction, and temporal prediction, also referred to as interprediction. For video sequences that are captured by camera inreal-life, it is highly likely that much redundant information existseither within a picture or across several pictures. The motivation ofthe two prediction methods is to exploit these redundancies in differentdimensions to reduce the size of the video following encoding.

Intra prediction removes spatial redundancy. It predicts a sample blockusing previously decoded sample blocks within the current picture. Apicture consisting of only intra-predicted sample blocks is referred asan intra picture.

Inter prediction removes temporal redundancy. It predicts sample blocksin a current picture using one or two prediction blocks that belong toone or two previously decoded pictures. The previously decoded picturesthat are used for prediction are referred to as reference pictures. Thelocation of a referenced prediction block inside a reference picture isindicated using a motion vector. Each motion vector consists of x and ycomponents, which correspond to the displacement between current sampleblock and the referenced prediction block. In order to capture thedisplacement more accurately, the motion vectors could point tofractional sample positions in the reference picture. Those fractionalsamples are generated from the nearby integer samples usinginterpolation.

When encoding a non-intra picture, i.e., an inter picture, it ispossible to have several reference pictures. These reference picturesare usually grouped into two reference picture lists. The referencepictures that are output for display before the current picture aregrouped into list 0. The reference pictures that are output for displayafter the current picture are grouped into list 1. Inter-predictedsample blocks have two inter prediction types, uni- and bi-prediction.Uni-prediction is achieved by predicting from one prediction block inone reference picture. Bi-prediction is achieved by predicting from ablending of two prediction blocks in one or two reference pictures. Thedefault blending method in most video coding standards is the average ofthe two prediction blocks.

Deblocking is a filtering process that aims at eliminating blockartefacts. As the sample blocks are encoded relative independently,there is a predisposition towards discontinuities on the blockboundaries between neighboring sample blocks. The deblocking filteringis designed to tackle such discontinuities. The decision whether toapply deblocking filtering lies on the hypothesis that a block boundarytends to be visible when there is a large discrepancy between the twoneighboring sample blocks.

The video coding standard High Efficiency Video Coding (HEVC), alsoreferred to as H.265 and MPEG-H Part 2, uses a parameter called boundarystrength B_(s) as an indication of the discrepancy level over blockboundaries. The B_(s) parameter is estimated by comparing predictioninformation, such as prediction mode, motion vectors and referencepictures, for the current sample block 2 and its neighboring sampleblock 3 in a picture 1, see FIG. 1.

Considering the two sample blocks P and Q 2, 3, the boundary strengthB_(s) is decided, in HEVC, to be larger than 0 when any of the followingcriteria is met:

-   -   At least one of the two sample blocks 2, 3 uses intra prediction        as prediction mode.    -   The two sample blocks 2, 3 use different number of motion        vectors and/or different number of reference pictures. For        instance, the sample block P 2 uses uni-direction inter        prediction, whereas the sample block Q 3 uses bi-direction inter        prediction.    -   The two sample blocks 2, 3 use different reference pictures. For        instance, the sample block P 2 uses a reference picture with        Picture Order Count (POC) value 0, whereas the sample block Q 3        uses a reference picture with POC value 4.    -   The two sample blocks 2, 3 use the same reference picture but        the difference between the motion vectors is equal to or larger        than a threshold value of 4 either in the horizontal or vertical        direction. For instance, the sample block P 2 uses a motion        vector MV_(P)=(6, 5), whereas the sample block Q 3 uses a motion        vector MV_(Q)=(−2, 0).

More information of derivation of the B_(s) parameter in HEVC can befound in section 8.7.2.4 Derivation process of boundary filteringstrength in [1].

More advanced deblocking filtering performs some additional analyses onthe reconstructed or decoded sample values inside the sample blocks 2,3. These additional analyses try to identify whether the sample blocks2, 3 are smooth or not. As for sample blocks that are not smooth butwith details, deblocking filtering should be avoided as it can induceunwanted blurring. In HEVC, these checks are performed on sample valueson either side of the block boundary 4 separating the two sample blocks2, 3 as is described in sections 8.7.2.5.3 Decision process for lumablock edges and 8.7.2.5.6 Decision process for a luma sample in [1].

Local Illumination Compensation (LIC) is an approach for tacklinginhomogeneous illuminance or luma changes inside a picture. LIC is basedon a linear model and the LIC parameters are adaptively set or derivedfor each prediction block. More information on LIC and illuminationcompensation can be found in section 1.8.5.3.3.2 Illuminationcompensated sample prediction process in [1], in which the LICparameters include LIC weighting factors, icWeightL0 and icWeightL1,specifying weights for illumination compensation, and LIC additiveoffsets, icOffsetL0 and icOffsetL1 specifying offsets for illuminationcompensation. In [2] LIC parameters are derived based on samples outsidethe sample block and corresponding samples outside the reference block,and thus no LIC parameters need to be signaled.

The deblocking filtering in current video coding standards, such asHEVC, has shortcomings and may produce visually unpleasant blockingartefacts in some situations, such as in video sequences whereillumination compensation is used for at least one color component.Thus, there is a need for improvement in the deblocking filteringcontrol, and in particular such improvements that may reduce blockingartefacts in pictures of a video sequence.

SUMMARY

It is a general objective to provide a deblocking filtering control thatmay reduce the risk of block artefacts in pictures of a video sequence.

This and other objectives of the embodiments are met by embodiments asdisclosed herein.

An aspect of the embodiments relates to a deblocking filtering controlmethod. The deblocking filtering control method comprises decidingwhether to apply deblocking filtering to sample values in a sample blockin a picture and in a neighboring sample block in the picture based oni) whether illumination compensation is enabled for sample predictionvalues in a first prediction block in a reference picture for saidsample block and/or ii) whether illumination compensation is enabled forsample prediction values in a second prediction block in said referencepicture or another reference picture for said neighboring sample block.The sample block and the neighboring sample block are separated in thepicture by a block boundary.

Another aspect of the embodiments relates to a deblocking filteringcontrol device. The deblocking filtering control device is configured todecide whether to apply deblocking filtering to sample values in asample block in a picture and in a neighboring sample block in thepicture based on i) whether illumination compensation is enabled forsample prediction values in a first prediction block in a referencepicture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block. The sample block and the neighboringsample block are separated in the picture by a block boundary.

A further aspect of the embodiments relates to a deblocking filteringcontrol device. The deblocking filtering control device comprises adecision module for deciding whether to apply deblocking filtering tosample values in a sample block in a picture and in a neighboring sampleblock in the picture based on i) whether illumination compensation isenabled for sample prediction values in a first prediction block in areference picture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block. The sample block and the neighboringsample block are separated in the picture by a block boundary.

Yet another aspect of the embodiments relates to a computer programcomprising instructions, which when executed by at least one processor,cause the at least one processor to decide whether to apply deblockingfiltering to sample values in a sample block in a picture and in aneighboring sample block in the picture based on i) whether illuminationcompensation is enabled for sample prediction values in a firstprediction block in a reference picture for said sample block and/or ii)whether illumination compensation is enabled for sample predictionvalues in a second prediction block in said reference picture or anotherreference picture for said neighboring sample block. The sample blockand the neighboring sample block are separated in the picture by a blockboundary.

A further aspect of the embodiments relates to a carrier comprising acomputer program as defined above. The carrier is one of an electronicsignal, an optical signal, an electromagnetic signal, a magnetic signal,an electric signal, a radio signal, a microwave signal, or acomputer-readable storage medium.

The embodiments reduce the risk of visually annoying blocking artefactsin pictures of a video sequence, and in particular in video sequenceswith fades. Accordingly, the subjective quality may be improved byeliminating or at least reducing such block artefacts.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments, together with further objects and advantages thereof,may best be understood by making reference to the following descriptiontaken together with the accompanying drawings, in which:

FIG. 1 schematically illustrates adjacent sample blocks separated by ablock boundary in a picture;

FIG. 2 schematically illustrates a sample block and a neighboring sampleblock;

FIG. 3 schematically illustrates inter prediction for a sample block anda neighboring sample block;

FIG. 4 is a flow chart illustrating a deblocking filtering controlmethod according to an embodiment;

FIG. 5 is a flow chart illustrating an additional, optional step of thedeblocking filtering control method shown in FIG. 4 according to anembodiment;

FIG. 6 is a flow chart illustrating a deblocking filtering controlmethod according to another embodiment;

FIG. 7 is a flow chart illustrating an additional, optional step of thedeblocking filtering control method shown in FIG. 4 according to anotherembodiment;

FIG. 8 is a flow chart illustrating an additional, optional step of thedeblocking filtering control method shown in FIG. 4 according to afurther embodiment;

FIG. 9 is a flow chart illustrating an additional, optional step of thedeblocking filtering control method shown in FIG. 8 according to anembodiment;

FIG. 10 is a flow chart illustrating a deblocking filtering controlmethod according to a further embodiment;

FIG. 11 is a schematic block diagram of a video encoder according to anembodiment;

FIG. 12 is a schematic block diagram of a video decoder according to anembodiment;

FIG. 13 is a schematic block diagram of a deblocking filtering controldevice according to an embodiment;

FIG. 14 is a schematic block diagram of a deblocking filtering controldevice according to another embodiment;

FIG. 15 is a schematic block diagram of a deblocking filtering controldevice according to a further embodiment;

FIG. 16 schematically illustrate a computer program based implementationof an embodiment;

FIG. 17 is a schematic block diagram of a deblocking filtering controldevice according to yet another embodiment;

FIG. 18 is a schematic block diagram of a user equipment according to anembodiment;

FIG. 19 schematically illustrates a distributed implementation amongnetwork equipment; and

FIG. 20 is a schematic illustration of an example of a wirelesscommunication system with one or more cloud-based network equipmentaccording to an embodiment.

DETAILED DESCRIPTION

Throughout the drawings, the same reference numbers are used for similaror corresponding elements.

The present embodiments generally relate to deblocking filtering, and inparticular to control of deblocking filtering of sample values of asample block in a picture.

The prior art deblocking filtering is applied to block boundaries basedon the prediction information of the two neighboring sample blocksseparated, either in the vertical or horizontal direction, by the blockboundary. Generally, and with regard to inter predicted sample blocks,deblocking filtering is applied if there is a difference in theprediction information, such as using different numbers of motionvectors and/or reference pictures, using different reference picturesand/or using significantly different motion vectors.

However, there might be situations in which blocking artefacts arevisually present even if the prior art deblocking filtering controldecides not to apply any deblocking filtering to a block boundarybetween neighboring sample blocks. In particular, pictures with fadingeffects have a tendency to have visually annoying blocking artefactssince the prior art deblocking filtering control fails to select blockboundaries in such pictures for application of deblocking filtering.

In the following, the present embodiments are described further withreference to FIGS. 1-3 illustrating a sample block P 2 in a picture anda neighboring sample block Q 3 in the picture, and where the two sampleblocks 2, 3 are separated by a block boundary 4. In these figures, theblock boundary 4 is a vertical block boundary 4 and the two sampleblocks 2, 3 are positioned side-by-side in the picture 1. However, theembodiments also apply to a horizontal block boundary separating twosample blocks positioned with one sample block above the other sampleblock in the picture.

Thus, deblocking filtering control according to the embodiments ispreferably applied to vertical block boundaries, horizontal blockboundaries or both vertical and horizontal block boundaries in a pictureof a video sequence.

FIGS. 3(a)-(b) not only illustrate the current picture 1 of the videosequence but also a reference picture 10 of the video sequence. Thus, afirst prediction block 20 in the reference picture 10 is used forprediction of the sample values of the sample block 2 in the currentpicture 1. This first prediction block 20 is identified by a motionvector 21 determined for the sample block 2. Correspondingly, a secondprediction block 30 in the reference picture 10 is used for predictionof the sample values of the neighboring sample block 3 in the currentpicture 1. The second prediction block 30 is identified by a motionvector 31 determined for the neighboring sample block 3. The firstprediction block 20 and the second prediction block 30 may be parts ofthe same reference picture 10, as depicted in FIG. 3(b). However, thesecond prediction block 30 may as well be a part of another referencepicture 11 different than the reference picture 10, as shown in FIG.3(c).

A sample value, also denoted pixel value in the art, of a sample, alsodenoted pixel in the art, in the sample block 2 or in the neighboringsample block 3 could be any sample value assigned to samples in sampleblocks 2, 3 to be encoded and decoded. In a typical embodiment, thesample value is a color component value.

FIG. 2 schematically indicates sample values in a sample block 2 and itsneighboring sample block 3. In FIG. 2 with a vertical block boundary 4,pj_(i) denotes a sample value of a sample in row i and column j in thesample block 2 and qj_(i) correspondingly denotes a sample value of asample in row i and column j in the neighboring sample block 3. In thisexample, row numbering goes from up to down as shown in FIG. 2, whereascolumn numbering goes from the block boundary 4 and to the left in FIG.2 for the sample block 2 and to the right in FIG. 2 for the neighboringsample block 3.

Video coding uses various color spaces and formats to represent thecolors of the sample values in the pictures 1, 10 of the video sequence.Non-limiting, but illustrative, examples of such color spaces or formatsinclude red (R), green (G), blue (B) color, i.e., RGB color; luma (Y′)and chroma (Cb, Cr) color, i.e., Y′CbCr color; luminance (Y) andchrominance (X, Z) color, i.e., XYZ color; luma (l) and chroma (Ct, Cp)color, i.e., lCtCp color. In such a case, a sample value as used hereincould be any color component value, such as a R, G, B, Y′, Cb, Cr, X, Y,Z, l, Ct or Cp value. In a particular embodiment, a sample value is aluma value Y′ or a chroma value Cb or Cr, more preferably a luma valueY′.

FIG. 4 is a flow chart of a deblocking filtering control methodaccording to an embodiment. The deblocking filtering control methodcomprises deciding, in step S1, whether to apply deblocking filtering tosample values in a sample block 2 in a picture 1 and in a neighboringsample block 3 in the picture 1 based on i) whether illuminationcompensation is enabled for sample prediction values in a firstprediction block (20) in a reference picture (10) for said sample block(2) and/or ii) whether illumination compensation is enabled for sampleprediction values in a second prediction block (30) in said referencepicture (10) or another reference picture (11) for said neighboringsample block (3). The sample block 2 and the neighboring sample block 3are separated in the picture 1 by a block boundary 4. Whether or notillumination compensation is enabled can, for example, be indicated by aflag that has a value of 1 when illumination compensation is enabled and0 when it is not enabled, or vice versa. In an embodiment, the firstprediction block 20 is identified in the reference picture 10 based on amotion vector 21 associated with or determined for the sample block 2.Correspondingly, the second prediction 30 is identified in the referencepicture 10 or the reference picture 11 based on a motion vector 31associated with or determined for the neighboring sample block 3.

The first prediction block 20 and the second prediction block 30 couldbe a same prediction block in the reference picture 10. Thus, in such acase the respective motion vectors 21, 31 identifies a same predictionblock in the reference picture 10. Alternatively, the first predictionblock 20 and the second prediction block 30 are different predictionblocks 20, 30 in the reference picture 10. Finally, the first predictionblock 20 and the second prediction block 30 are different predictionblocks in different reference pictures 10 and 11 respectively.

The motion vector 21 associated with the sample block 2 and identifyingthe first prediction block 20 could have the same vector coordinates asthe motion vector 31 associated with the neighboring sample block 3 andidentifying the second prediction block 30, i.e., MV_(P)=MV_(Q)=(x, y).Alternatively, at least one of the x coordinate and the y coordinatediffers between the motion vectors 21, 31. In a particular embodiment,any difference between the motion vector 21 associated with the sampleblock 2 and the motion vector 31 associated with the neighboring sampleblock 3 is smaller than the previously mentioned threshold value,preferably 4, both in the horizontal direction (x coordinate) and thevertical direction (y coordinate), i.e., |x_(P)−x_(Q)|<T and|y_(P)−y_(Q)|<T, wherein MV_(P)=(x_(P), y_(P)), MV_(Q)=(x_(Q), y_(Q))and T denotes the threshold value.

If the difference between the motion vectors 21, 31 is equal to orlarger than the threshold value then deblocking filtering is preferablyapplied to the block boundary 4 according to the prior art techniques bysetting the boundary strength B_(s) to a value larger than 0 asmentioned in the foregoing.

The deblocking filtering control of the embodiments performs thedecision whether to apply deblocking filtering or not at least partlybased on whether illumination compensation is enabled in the first andsecond prediction block 20, 30 in the reference picture 10 or firstprediction block in 10 and second prediction block in 11. This meansthat even if the first and second prediction blocks 20, 30 are the sameor the motion vectors 21, 31 do not differ more than the threshold valueit could be beneficial to apply deblocking filtering to the blockboundary 4 if at least one of the first prediction block and the secondprediction block has used illumination compensation.

Thus, the embodiments provide a new criterion with regard to deblockingfiltering control. This criterion involves whether illuminationcompensation is enabled in the prediction blocks 20, 30. This newcriterion could be used alone in the deblocking filtering control. In analternative embodiment, the criterion is used together with othercriteria in deciding whether to apply deblocking filtering. This meansthat the decision in step S1 could be based solely on whether ofillumination compensation is enabled or be based at least partly onwhether illumination compensation is enabled, which are further escribedhere below.

Illumination compensation as used herein indicates a modification thatchanges the magnitude of the sample prediction values in the predictionblocks 20, 30. Non-limiting, but illustrative, examples of suchmagnitude modifications include weights and offsets. For instance,weights applied to the prediction blocks 20, 30 will scale the sampleprediction values, i.e., change a sample prediction value v_(ij) intoweight×v_(ij). Correspondingly, offsets applied to prediction blocks 20,30 will modify the magnitude of the sample prediction values, i.e.,change a sample prediction value v_(ij) into v_(ij)+offset. Illuminationcompensation in this context is also interchangeably used with localillumination compensation, where the local illumination compensationrefers to illumination compensation that is performed on the predictionblocks 20 and 30, i.e. locally.

In a particular embodiment, illumination compensation in the firstprediction block will results in a first magnitude modification of theaverage sample prediction value in the first prediction block 20 andillumination compensation in the second prediction block will result ina second magnitude modification of the average sample prediction valuein the second prediction block 30. In other words, the first and secondmagnitude modifications modify the average sample prediction values inthe prediction blocks 20, 30.

Thus, the first and second (local) illumination compensation do notnecessarily have to, but could, modify the magnitude of the sampleprediction values of all samples in the first and second predictionblock 20, 30. However, the modification as applied to at least one,typically multiple, of the samples in the prediction blocks 20, 30 willchange the average sample prediction value of the prediction block 20,30.

FIG. 5 is a flow chart illustrating an additional, optional step of thedeblocking filtering control method. In this embodiment, the firstmagnitude modification of sample prediction values from at least onefirst local illumination compensation parameter and the second magnitudemodification of sample prediction values from at least one second localillumination compensation parameter are compared in step S10. The methodthen continues to step S1 in FIG. 4. In this embodiment, step S1comprises deciding whether to apply deblocking filtering to samplevalues in the sample block 2 and in the neighboring sample block 3 basedon the comparison of the first magnitude modification of sampleprediction values and the second magnitude modification of sampleprediction values.

Thus, in this embodiment the two magnitude modifications are compared toeach other and the decision whether to apply any deblocking filtering isthen made based on the comparison, i.e., how much the first and secondmagnitude modifications differ from each other.

FIG. 6 is a flow chart illustrating a deblocking filtering controlmethod according to another embodiment. In an optional step S20, thedifference between the first magnitude modification of sample predictionvalues and the second magnitude modification of sample prediction valuesis compared to a threshold value (T). If the first magnitudemodification of sample prediction values differ from the secondmagnitude modification of sample prediction values with at least thethreshold value the method continues to step S21. This step S21comprises deciding that deblocking filtering may be applied to thesample values in the sample block 2 and in the neighboring sample block3. However, if the first magnitude modification of sample predictionvalues does not differ from the second magnitude modification of sampleprediction values with at least the threshold value the method insteadcontinues to step S22. Step S22 comprises deciding not to applydeblocking filtering to the sample values in the sample block 2 and inthe neighboring sample block 3.

Thus, if the difference between the first and second magnitudemodifications is large, i.e., equal to or larger than the thresholdvalue, then deblocking filtering may be applied and otherwise nodeblocking filtering should be applied. The difference could be a simpledifference, i.e., (MM_(P)−MM_(Q)); an absolute difference, i.e.,|MM_(P)−MM_(Q)|; or a squared difference, i.e., (MM_(P)−MM_(Q))² betweenthe first magnitude modification of sample prediction values (MM_(P))and the second magnitude modification of sample prediction values(MM_(Q)). In the latter two cases, only the magnitudes of MM_(P) andMM_(Q) are of relevance and not the signs.

In another embodiment, the method continues from step S20 to step S21 ifthe difference between the first and second magnitude modifications ofsample prediction values is larger than a threshold value and otherwisecontinues to step S22.

In a particular embodiment, the threshold value is 1. In anotherparticular embodiment, the threshold value is 2. Optionally, thethreshold value could be larger for larger bit-depth.

Instead of calculating a difference between the magnitude modificationsin step S20, a quotient between the magnitude modifications could becalculated, such as MM_(P)/MM_(Q) or MM_(Q)/MM_(P). In such a case, ifthe quotient is one or close to one, i.e., ≥T_(min) but or ≤T_(max) or>T_(min) but <T_(max), wherein T_(min)<1 and T_(max)>1, then the methodcontinues from step S20 to step S22, otherwise the method continues fromstep S20 to step S21.

As was mentioned in the foregoing, in HEVC a boundary strength B_(s)parameter is used in the decision of whether to apply deblockingfiltering or not. Generally, if B_(s) is larger than 0, typically 1 or2, then deblocking filtering may be applied but if B_(s) is equal to 0then no deblocking filtering is applied.

The present embodiments can be used to set the value of the boundarystrength B_(s) in the deblocking filtering control method. Such anembodiment is shown in FIG. 7. In this embodiment, step S30 comprisesdetermining a value of a boundary strength parameter based on whetherillumination compensation for first magnitude modification of sampleprediction values is enabled and/or whether illumination compensationfor the second magnitude modification of sample prediction values isenabled. The method then continues to step S1 in FIG. 4. In thisembodiment, step S1 comprises deciding whether to apply deblockingfiltering to the sample values in the sample block 2 and in theneighboring sample block 3 based on the value of the boundary strengthparameter.

This embodiment can be combined with the embodiments shown in FIGS. 5and 6. Thus, the value of the boundary strength parameter is determinedbased on a comparison of the first magnitude modification of sampleprediction values from a first local illumination compensation and/orthe second magnitude modification of sample prediction values from asecond local illumination compensation as performed in step S10 in FIG.5. Correspondingly, in an embodiment step S21 of FIG. 6 comprisessetting the boundary strength parameter to a value larger than 0 andthen deciding that deblocking filtering may be applied since theboundary strength parameter has a value larger than 0. Step S22 thenpreferably comprises setting the boundary strength parameter to 0 andthereby deciding not to apply deblocking filtering.

In a particular embodiment, the boundary strength parameter isinitialized to 0. Then, the criterion as shown in step S20 is checkedand if it is met the value of the boundary strength parameter is set toa larger value than 0, such as 1. However, if the criterion is not met,no change of the initial value of the boundary strength is made. Thus,in such an embodiment, step S22 comprises keeping the boundary strengthparameter value of 0 and thereby deciding not to apply deblockingfiltering.

The determination of the value of the boundary strength parameter basedon the usage of local illumination compensation or comparing magnitudemodifications from local illumination compensation according to theembodiments can be combined with the previously described criteriarelating to HEVC with regard to setting the value of the boundarystrength parameter.

In such an embodiment, the boundary strength parameter B_(s) isdetermined to be larger than 0 when any of the following criteria ismet:

-   -   At least one of the two sample blocks 2, 3 uses intra prediction        as prediction mode.    -   The two sample blocks 2, 3 use different number of motion        vectors 21, 31 and/or different number of reference pictures 10.    -   The two sample blocks 2, 3 use different reference pictures 10.    -   The two sample blocks 2, 3 use the same reference picture 10 but        the difference between the motion vectors 21, 31 is equal to or        larger than a threshold value of 4 either in the horizontal or        vertical direction.    -   At least one of the two sample blocks 2, 3 uses illumination        compensation.    -    Alternatively:    -   The difference between magnitude modifications of sample        prediction values in the prediction blocks 20, 30 for the two        sample blocks 2, 3 from illumination compensation in at least        one of the two sample blocks is equal to or larger than a        threshold value.

In a particular embodiment, the boundary strength parameter B_(s) is setto 2 if the first criterion above is met, i.e., at least one of the twosample blocks 2, 3 uses intra prediction as prediction mode, set to 1 ifany of the other criteria is met and is otherwise set to 0 if none ofthe criteria is met. In this particular embodiment, the criterionrelating to illumination compensation is an extra criterion added to thelist of four criteria.

Generally, deblocking filtering may be applied to luma values in asample block 2 and luma values in a neighboring sample block 3 if theboundary strength parameter B_(s) has a value of 1 or 2. Deblockingfiltering may be applied to chroma values in the sample block 2 andchroma values in the neighboring sample block 3 if the boundary strengthparameter B_(s) has a value of 2. No deblocking filtering is applied toeither luma or chroma values if the boundary strength parameter B_(s)has a value of 0.

Thus, in this particular embodiment, if the criterion of theembodiments, i.e., the criterion based on the magnitude modification ofsample prediction values in the prediction blocks 20, 30, is met theboundary strength parameter B_(s) is set to 1 and deblocking filteringmay be applied to luma values in the sample block 2 and luma values inthe neighboring sample block 3. However, in an embodiment, no deblockingfiltering is applied to the chroma values since the boundary strengthparameter B_(s) has the value 1 and not 2.

In another particular embodiment, the boundary strength parameter B_(s)is set to 2 if the first criterion above is met, set to 1 if any of thesecond to fourth criterion but not the fifth criterion is met, set to 2if any of the second to fourth criterion and the fifth criterion is metand otherwise set to 0. In this particular embodiment, the fifthcriterion relating to magnitude modifications is an extra criterion thatis checked when any of the three criteria relating to inter-predictionis met. The fifth criterion is then used to determine whether to set theboundary strength parameter B_(s) to a value of 1 or 2. This means thatthe fifth criterion is used to decide whether to apply deblockingfiltering to only luma values in the sample block 2 and the neighboringsample block or to both luma and chroma values in the sample block 2 andthe neighboring sample block 3.

In another particular embodiment, the boundary strength parameter couldbe set separately for chroma such that chroma deblocking is applied ifat least one of the sample blocks 2 and 3 use illumination compensationor intra prediction for corresponding chroma component.

In another particular embodiment the boundary strength parameter is setto 3 if illumination compensation is used for at least one of the sampleblocks 2 and 3 for both luma and chroma components meaning that chromadeblocking should be applied and that luma deblocking is applied butwith a boundary strength of 1.

In a particular embodiment, the fifth and last criterion is defined as:

-   -   The two sample blocks 2, 3 use the same reference picture 10,        the difference between the motion vectors 21, 31 is smaller than        the threshold value of 4 both in the horizontal direction and in        the vertical direction and the difference between magnitude        modifications of sample prediction values in the prediction        blocks 20, 30 for the two sample blocks 2, 3 is equal to or        larger than a threshold value.

Thus, in this particular embodiment, the fifth criterion is merelychecked and applied if none of the three other inter-prediction relatedcriteria are met.

The magnitude modifications of sample prediction values are, in anembodiment, not only used to decide whether to apply deblockingfiltering or not. In this embodiment, the magnitude modifications arealso used to decide whether to apply strong deblocking filtering or weakdeblocking filtering to the sample values in the sample block 2 and theneighboring sample block 3.

Generally, strong deblocking filtering filters sample values in thesample block 2 and the neighboring sample block 3 more heavily ascompared to weak deblocking filtering.

In such an embodiment, step S1 in FIG. 4 comprises deciding to applydeblocking filtering to the sample values in the sample block 2 and inthe neighboring sample block 3 based on the first magnitude modificationof sample prediction values and the second magnitude modification ofsample prediction values. The method then continues to step S41 in FIG.8. This step S41 comprises deciding whether to apply strong deblockingfiltering or weak deblocking filtering to sample values in the sampleblock 2 and in the neighboring sample block 3 based on the firstmagnitude modification of sample prediction values and the secondmagnitude modification of sample prediction values.

In HEVC, the strong deblocking filtering is applied to the sample valuesif the following conditions are met, otherwise the weak deblockingfiltering is applied, see FIG. 2:

${{2 \times \left( {{{{p\; 2_{i}} - {2p\; 1_{i}} + {p\; 0_{i}}}} + {{{q\; 2_{i}} - {2q\; 1_{i}} + {q\; 0_{i}}}}} \right)} < \left( {\beta ⪢ 2} \right)} = \frac{\beta}{4}$${{{{{p\; 3_{i}} - {p\; 0_{i}}}} + {{{q\; 3_{i}} - {q\; 0_{i}}}}} < \left( {\beta ⪢ 3} \right)} = \frac{\beta}{8}$p 0_(i) − q 0_(i) < ((5 × t_(C) + 1) ⪢ 1) = 2.5 × t_(C), wherein  i = 0, 3.

In HEVC, the value of the parameters β, t_(c) depend on the quantizationparameter of the sample block 2 as shown in Table 8-11—Derivation ofthreshold variables β′ and t_(c)′ from input Q of [1]. More informationof strong and weak deblocking filtering can be found in section8.7.2.5.7 Filtering process for a luma sample in [1].

In an embodiment, the deblocking filtering control method comprises theadditional, optional step S40 as shown in FIG. 9. This step S40comprises determining a value of at least one parameter selected from agroup consisting of β and t_(c) based on the first magnitudemodification of sample prediction values and the second magnitudemodification of sample prediction values. The deblocking filteringcontrol method then continues to step S41 in FIG. 8. In this embodiment,step S41 comprises deciding to apply the strong deblocking filtering tothe sample values in the sample block 2 and in the neighboring sampleblock 3 2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply the weak deblocking filtering to the sample values in thesample block 2 and in the neighboring sample block 3. With reference toFIG. 2, p0_(i) denotes a sample value of a first sample, relative to theblock boundary 4, in a line i of samples 5 in the sample block 2, p1_(i)denotes a sample value of a second sample, relative to the blockboundary 4, in the line i of samples 5 in the sample block 2, p2_(i)denotes a sample value of a third sample, relative to the block boundary4, in the line i of samples 5 in the sample block 2. Correspondingly,q0_(i) denotes a sample value of a first sample, relative to the blockboundary 4, in the line i of samples 5 in the neighboring sample block3, q1_(i) denotes a sample value of a second sample, relative to theblock boundary 4, in the line i of samples 5 in the neighboring sampleblock 3, and q2_(i) denotes a sample value of a third sample, relativeto the block boundary 4, in the line i of samples 5 in the neighboringsample block 3.

In an embodiment, the value of the parameter β is determined in step S40based on the magnitude modifications. In another embodiment, the valueof the parameter t_(c) is determined in step S40 based on the magnitudemodifications. In a further embodiment, the values of the parameters βand t_(c) are determined in step S40 based on the magnitudemodifications.

In these embodiments, the value(s) of the parameter(s) β and/or t_(c)could be determined solely based on the magnitude modifications or bedetermined at least partly based on the magnitude modifications. In thelatter case, at least one other parameter is used determine the value(s)of the parameter(s) β and/or t_(c). This at least one other parameter ispreferably the quantization parameter of the sample block 2, such as thequantization parameter Q listed in Table 8-11—Derivation of thresholdvariables β and t_(c)′ from input Q in [1].

For instance, the value(s) of the parameter(s) β and/or t_(c) could bedetermined based on the difference or quotient between the firstmagnitude modification and the second magnitude modification. Generally,the larger the difference between the first and second magnitudemodification the higher the value(s) of the parameter(s) β and/or t_(c).This in turn implies that strong deblocking filtering is more likely tobe selected for the sample block 2 and the block boundary 4 as comparedto having lower value(s) of the parameter(s) β and/or t_(c).

Alternatively, initial values of the parameters β and t_(c) could bedetermined based on, for instance, the quantization parameter. Theinitial values may then be modified or adjusted based on the magnitudemodifications. For instance, the parameter β=β_(I)+β_(M) orβ=β_(M)×β_(I), wherein β_(I) denotes the initial value of the parameterβ and β_(M) denotes the modification applied to the initial value anddetermined based on the magnitude modifications. The same principle canbe applied to the parameter t_(c). In such a case, the modification tothe parameter(s) β and/or t_(c) is generally larger for a largerdifference between the first and second magnitude modifications.

The decision to apply strong or weak deblocking filtering based on themagnitude modifications can be used independently of deciding whether toapply deblocking filtering or not based on the magnitude modifications.This embodiment is illustrated in the flow chart of FIG. 10. Thus, anembodiment relates to a deblocking filtering control method. Thedeblocking filtering control method comprises deciding, in step S51,whether to apply strong deblocking filtering or weak deblockingfiltering to sample values in a sample block 2 in a picture 1 and in aneighboring sample block 3 in the picture 1 based on i) a firstmagnitude modification of sample prediction values in a first predictionblock 20 in a reference picture 10 for the sample block 2 and ii) asecond magnitude modification of sample prediction values in a secondprediction block 20 in the reference picture 10 for the neighboringsample block 3. The sample block 2 and the neighboring sample block 3are separated in the picture 1 by a block boundary 4.

In an embodiment, the deblocking filtering control method also comprisesstep S50. This step S50 comprises determining a value of at least oneparameter selected from a group consisting of β and t_(c) based on thefirst magnitude modification of sample prediction values and the secondmagnitude modification of sample prediction values. The deblockingfiltering control method then continues to step S51. In this embodiment,step S51 comprises deciding to apply the strong deblocking filtering tothe sample values in the sample block 2 and in the neighboring sampleblock 3 if 2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply the weak deblocking filtering to the sample values in thesample block 2 and in the neighboring sample block 3.

In an embodiment, step S1 of FIG. 4 comprises deciding whether to applydeblocking filtering to the sample values in the sample block 2 and inthe neighboring sample block 3 based on the first magnitude modificationof sample prediction values, the second magnitude modification of sampleprediction values, an average value of the sample values in the sampleblock 2 and an average value of the sample values in the neighboringsample block 3.

Thus, in this embodiment the decision of whether to apply deblockingfiltering or not are not based only on the magnitude modifications butalso on the average sample values in the sample block 2 and in theneighboring sample block 3. For instance, there are possibilities thatthe difference between average sample values, such as difference betweenaverage luma values, of the sample block 2 and the neighboring sampleblock 3 is large, which makes it difficult to decide whether the largedifference in average sample values is caused by the prediction process,in which case deblocking filtering should be applied, or is coming fromthe properties of the original video signal, in which case no deblockingfiltering should be applied. Thus, if the difference between averagesample values exceeds a defined threshold then deblocking filteringshould not be applied.

In a particular embodiment, the defined threshold has a value equal to ascaling of the parameter t_(c), i.e., γ×t_(c), wherein γ is a positiveinteger value, preferably selected within a range of 1 to 20, such as 1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 or 20.

The average sample value could be calculated for all samples in thesample block 2 and the neighboring sample block 3, or for a sub-portionthereof, such as based on the sample values of samples in one or moreselected lines 5 of samples in the sample block 2 and the neighboringsample block 3.

In a particular embodiment, two differences are thereby calculated, afirst difference between the first and second magnitude modificationsand a second difference between the average sample values. In such acase, deblocking filtering is applied to sample values in the sampleblock 2 and in the neighboring sample block 3 if the first difference isequal to or above a first threshold value but the second difference isequal to or below a second threshold value, otherwise no deblockingfiltering is applied.

Hence, in an embodiment step S1 comprises deciding, if a differencebetween the average value of the sample values in the sample block 2 andthe average value of the sample values in the neighboring sample block 3is equal to or smaller than a threshold value, whether to applydeblocking filtering to the sample values in the sample block 2 and inthe neighboring sample block 3 based on the first magnitude modificationof sample prediction values and the second magnitude modification ofsample prediction values.

Hence, in an embodiment step S1 of FIG. 4 comprises deciding whether toapply deblocking filtering to the sample values in the sample block 2and in the neighboring sample block 3 based on i) a value of a first LICparameter for the first prediction block 20 and ii) a value of a secondLIC parameter for the second prediction block 30.

In a particular embodiment, the first and second LIC parameters are LICweighting factors, e.g., the parameter icWeightL0 and/or icWeightL1. Insuch a particular embodiment, step S1 comprises deciding whether toapply deblocking filtering to the sample values in the sample block 2and in the neighboring sample block 3 based on i) a value of a first LICweighting factor for the sample prediction values of the firstprediction block 20 and ii) a value of a second LIC weighting factor forthe sample prediction values of the second prediction block 30.

Note that at least one of the LIC weighting factors may be equal to one,i.e., corresponding to no weighting at all.

In another particular embodiment, the first and second LIC parametersare LIC additive offsets, e.g., the parameter icOffsetL0 and/oricOffsetL1. In this particular embodiment, step S1 comprises decidingwhether to apply deblocking filtering to the sample values in the sampleblock 2 and in the neighboring sample block 3 based on i) a value of afirst LIC additive offset for the sample prediction values of the firstprediction block 20 and ii) a value of a second LIC additive offset forthe sample prediction values of the second prediction block 30.

Note that at least one of the LIC additive offsets may be equal to zero,i.e., corresponding to no additive offset at all.

In these embodiments, the sample values and the sample prediction valuesare luma or chroma values.

Another aspect of the embodiments relates to a deblocking filteringcontrol device. The deblocking filtering control device is configured todecide whether to apply deblocking filtering to sample values in asample block in a picture and in a neighboring sample block in thepicture based on i) whether illumination compensation is enabled forsample prediction values in a first prediction block in a referencepicture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block The sample block and the neighboringsample block are separated in the picture by a block boundary.

In an embodiment, the deblocking filtering control device is configuredto decide whether to apply deblocking filtering to the sample values insaid sample block and in the neighboring sample block if illuminationcompensation is enabled for any of the sample blocks.

In an embodiment, the deblocking filtering control device is configuredto decide whether to apply deblocking filtering to the sample values inthe sample block and in the neighboring sample block based on i) a valueof a first Local Illumination Compensation, LIC, parameter for saidfirst prediction block and/or ii) a value of a second LIC parameter forsaid second prediction block.

In a particular embodiment, the deblocking filtering control device isconfigured to decide whether to apply deblocking filtering to the samplevalues in the sample block and in the neighboring sample block based oni) a value of a first LIC weighting factor for the sample predictionvalues of the first prediction block and ii) a value of a second LICweighting factor for the sample prediction values of the secondprediction block.

In another particular embodiment, the deblocking filtering controldevice is configured to decide whether to apply deblocking filtering tothe sample values in the sample block and in the neighboring sampleblock based on i) a value of a first LIC additive offset for the sampleprediction values of the first prediction block and ii) a value of asecond LIC additive offset for the sample prediction values of thesecond prediction block.

In an embodiment, the deblocking filtering control device is configuredto compare a first magnitude modification of sample prediction valuesbased on illumination compensation and/or a second magnitudemodification of sample prediction values based on illuminationcompensation. The deblocking filtering control device is alsoconfigured, in this embodiment, to decide whether to apply deblockingfiltering to the sample values in the sample block and in theneighboring sample block based on the comparison of the first magnitudemodification of sample prediction values and the second magnitudemodification of sample prediction values.

In an embodiment, the deblocking filtering control device is configuredto determine a value of a boundary strength parameter based on whetherillumination compensation is enabled, wherein said deblocking filteringcontrol device is configured to decide whether to apply deblockingfiltering to said sample values in said sample block and in saidneighboring sample block based on said value of said boundary strengthparameter. The deblocking filtering control device is also configured todecide whether to apply deblocking filtering to the sample values in thesample block and in the neighboring sample block based on the value ofthe boundary strength parameter.

In an embodiment, the deblocking filtering control device is configuredto decide whether to apply strong deblocking filtering or weakdeblocking filtering to the sample values in the sample block and in theneighboring sample block based on whether illumination compensation isenabled for at least one of the first and the second sample block.

In an embodiment, the deblocking filtering control device is configuredto determine a value of at least one parameter selected from a groupconsisting of parameters β and t_(c) based on whether illuminationcompensation is enabled for at least one of the first and second sampleblocks. The deblocking filtering control device is also configured todecide to apply the strong deblocking filtering to the sample values inthe sample block and in the neighboring sample block if2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0,3, and otherwise decide toapply the weak deblocking filtering to the sample values in the sampleblock and in the neighboring sample block.

An embodiment relates to a video encoder comprising a deblockingfiltering control device.

FIG. 11 is a schematic block diagram of a video encoder 40 according toan embodiment.

A current sample block is predicted by performing a motion estimation bya motion estimator 50 from already encoded and reconstructed sampleblock(s) in the same picture and/or in reference picture(s). The resultof the motion estimation is a motion vector in the case of interprediction. The motion vector is utilized by a motion compensator 50 foroutputting an inter prediction of the sample block.

An intra predictor 49 computes an intra prediction of the current sampleblock. The outputs from the motion estimator/compensator 50 and theintra predictor 49 are input in a selector 51 that either selects intraprediction or inter prediction for the current sample block. The outputfrom the selector 51 is input to an error calculator in the form of anadder 41 that also receives the sample values of the current sampleblock. The adder 41 calculates and outputs a residual error as thedifference in sample values between the sample block and its prediction,i.e., prediction block.

The error is transformed in a transformer 42, such as by a discretecosine transform (DCT), and quantized by a quantizer 43 followed bycoding in an encoder 44, such as by an entropy encoder. In inter coding,also the estimated motion vector is brought to the encoder 44 forgenerating the coded representation of the current sample block.

The transformed and quantized residual error for the current sampleblock is also provided to an inverse quantizer 45 and inversetransformer 46 to reconstruct the residual error. This residual error isadded by an adder 47 to the prediction output from the motioncompensator 50 or the intra predictor 49 to create a reconstructedsample block that can be used as prediction block in the prediction andcoding of other sample blocks. This reconstructed sample block is firstprocessed by a deblocking filtering control device 100 according to theembodiments in order to control any deblocking filtering that is appliedto the reconstructed sample block to combat any artefact. The processedreconstructed sample block is then temporarily stored in a DecodedPicture Buffer (DPB) 48, where it is available to the intra predictor 49and the motion estimator/compensator 50.

An embodiment relates to a video decoder comprising a deblockingfiltering control device.

FIG. 12 is a schematic block diagram of a video decoder 60 comprising adeblocking filtering control device 100 according to the embodiments.The video decoder 60 comprises a decoder 61, such as entropy decoder,for decoding a bitstream comprising an encoded representation of asample block to get a quantized and transformed residual error. Theresidual error is dequantized in an inverse quantizer 62 and inversetransformed by an inverse transformer 63 to get a decoded residualerror.

The decoded residual error is added in an adder 64 to the sampleprediction values of a prediction block. The prediction block isdetermined by a motion estimator/compensator 67 or intra predictor 66,depending on whether inter or intra prediction is performed. A selector68 is thereby interconnected to the adder 64 and the motionestimator/compensator 67 and the intra predictor 66. The resultingdecoded sample block output from the adder 64 is input to a deblockingfiltering control device 100 in order to control any deblockingfiltering that is applied to combat any artefacts. The filtered sampleblock enters a DPB 65 and can be used as prediction block forsubsequently decoded sample blocks. The DPB 65 is thereby connected tothe motion estimator/compensator 67 to make the stored sample blocksavailable to the motion estimator/compensator 67. The output from theadder 64 is preferably also input to the intra predictor 66 to be usedas an unfiltered prediction block. The filtered sample block isfurthermore output from the video decoder 60, such as output for displayon a screen.

In the embodiments disclosed in FIGS. 11 and 12 the deblocking filteringcontrol device 100 controls deblocking filtering in the form of socalled in-loop deblocking filtering. In an alternative implementation atthe video decoder 60, the deblocking filtering control device 100 isarranged to perform so called post-processing deblocking filtering. Insuch a case, the deblocking filtering control device 100 operates on theoutput pictures outside of the loop formed by the adder 64, the DPB 65,the intra predictor 66, the motion estimator/compensator 67 and theselector 68.

FIG. 13 is a schematic block diagram illustrating an example of adeblocking filtering control device 100 based on a processor-memoryimplementation according to an embodiment. In this particular example,the deblocking filtering control device 100 comprises a processor 101,such as processing circuitry, and a memory 102. The memory 102 comprisesinstructions executable by the processor 101.

In an embodiment, the processor 101 is operative to decide whether toapply deblocking filtering to the sample values in the sample block andin the neighboring sample block based on whether illuminationcompensation is enabled for sample prediction values in a firstprediction block in a reference picture for said sample block and/orwhether illumination compensation is enabled for sample predictionvalues in a second prediction block in said reference picture or anotherreference picture for said neighboring sample block.

In another embodiment, the processor 101 is operative to decide whetherto apply the strong deblocking filtering or the weak deblockingfiltering to sample values in the sample block and in the neighboringsample block based on whether illumination compensation is enabled forat least one of the first and the second sample block.

Optionally, the deblocking filtering control device 100 may also includea communication circuit, represented by an input/output (I/O) unit 103in FIG. 16. The I/O unit 103 may include functions for wired and/orwireless communication with other devices and/or network nodes in awired or wireless communication network. In a particular example, theI/O unit 103 may be based on radio circuitry for communication with oneor more other nodes, including transmitting and/or receivinginformation. The I/O unit 103 may be interconnected to the processor 101and/or memory 102. By way of example, the I/O unit 103 may include anyof the following: a receiver, a transmitter, a transceiver, I/Ocircuitry, input port(s) and/or output port(s).

FIG. 14 is a schematic block diagram illustrating another example of adeblocking filtering control device 110 based on a hardware circuitryimplementation according to an embodiment. Particular examples ofsuitable hardware circuitry include one or more suitably configured orpossibly reconfigurable electronic circuitry, e.g., Application SpecificIntegrated Circuits (ASICs), FPGAs, or any other hardware logic such ascircuits based on discrete logic gates and/or flip-flops interconnectedto perform specialized functions in connection with suitable registers(REG), and/or memory units (MEM).

FIG. 15 is a schematic block diagram illustrating yet another example ofa deblocking filtering control device 120 based on combination of bothprocessor(s) 122, 123 and hardware circuitry 124, 125 in connection withsuitable memory unit(s) 121. The video insert control device 120comprises one or more processors 122, 123, memory 121 including storagefor software (SW) and data, and one or more units of hardware circuitry124, 125. The overall functionality is thus partitioned betweenprogrammed software for execution on one or more processors 122, 123,and one or more pre-configured or possibly reconfigurable hardwarecircuits 124, 125. The actual hardware-software partitioning can bedecided by a system designer based on a number of factors includingprocessing speed, cost of implementation and other requirements.

FIG. 16 is a schematic diagram illustrating an example of a deblockingfiltering control device 200 according to an embodiment. In thisparticular example, at least some of the steps, functions, procedures,modules and/or blocks described herein are implemented in a computerprogram 240, which is loaded into the memory 220 for execution byprocessing circuitry including one or more processors 210. Theprocessor(s) 210 and memory 220 are interconnected to each other toenable normal software execution. An optional I/O unit 230 may also beinterconnected to the processor(s) 210 and/or the memory 220 to enableinput and/or output of relevant data, such as reconstructed or decodedpictures of a video sequence.

The term ‘processor’ should be interpreted in a general sense as anycircuitry, system or device capable of executing program code orcomputer program instructions to perform a particular processing,determining or computing task.

The processing circuitry including one or more processors 210 is thusconfigured to perform, when executing the computer program 240,well-defined processing tasks such as those described herein.

The processing circuitry does not have to be dedicated to only executethe above-described steps, functions, procedure and/or blocks, but mayalso execute other tasks.

In a particular embodiment, the computer program 240 comprisesinstructions, which when executed by at least one processor 210, causethe at least one processor 210 to decide whether to apply deblockingfiltering to sample values in a sample block in a picture and in aneighboring sample block in the picture based on i) whether illuminationcompensation is enabled for sample prediction values in a firstprediction block in a reference picture for said sample block and/or ii)whether illumination compensation is enabled for sample predictionvalues in a second prediction block in said reference picture or anotherreference picture for said neighboring sample block. The sample blockand the neighboring sample block are separated in the picture by a blockboundary.

In another particular embodiment, the computer program 240 comprisesinstructions, which when executed by at least one processor 210, causethe at least one processor 210 to decide whether to apply a strongdeblocking filtering or a weak deblocking filtering to sample values ina sample block in a picture and in a neighboring sample block in thepicture based on i) whether illumination compensation is enabled for atleast one of the first and the second sample block. The sample block andthe neighboring sample block are separated in the picture by a blockboundary.

The proposed technology also provides a carrier 250 comprising thecomputer program 240. The carrier 250 is one of an electronic signal, anoptical signal, an electromagnetic signal, a magnetic signal, anelectric signal, a radio signal, a microwave signal, or acomputer-readable storage medium.

By way of example, the software or computer program 240 may be realizedas a computer program product, which is normally carried or stored on acomputer-readable medium 250, in particular a non-volatile medium. Thecomputer-readable medium may include one or more removable ornon-removable memory devices including, but not limited to a Read-OnlyMemory (ROM), a Random Access Memory (RAM), a Compact Disc (CD), aDigital Versatile Disc (DVD), a Blu-ray disc, a Universal Serial Bus(USB) memory, a Hard Disk Drive (HDD) storage device, a flash memory, amagnetic tape, or any other conventional memory device. The computerprogram 240 may thus be loaded into the operating memory 220 of adeblocking filtering control device 200 for execution by the processingcircuitry 210 thereof.

The flow diagram or diagrams presented herein may be regarded as acomputer flow diagram or diagrams, when performed by one or moreprocessors. A corresponding deblocking filtering control device may bedefined as a group of function modules, where each step performed by theprocessor corresponds to a function module. In this case, the functionmodules are implemented as a computer program running on the processor.

The computer program residing in memory may, thus, be organized asappropriate function modules configured to perform, when executed by theprocessor, at least part of the steps and/or tasks described herein.

FIG. 17 is a schematic block diagram of a deblocking filtering controldevice 130 according to an embodiment. The deblocking filtering controldevice 130 comprises a decision module 131 for deciding whether to applydeblocking filtering to sample values in a sample block in a picture andin a neighboring sample block in the picture based on i) whetherillumination compensation is enabled for sample prediction values in afirst prediction block (20) in a reference picture (10) for said sampleblock (2) and/or ii) whether illumination compensation is enabled forsample prediction values in a second prediction block (30) in saidreference picture (10) or another reference picture (11) for saidneighboring sample block. The sample block and the neighboring sampleblock are separated in the picture by a block boundary.

In another embodiment, the deblocking filtering control device 130comprises a decision module 131 for deciding whether to apply a strongdeblocking filtering or a weak deblocking filtering to sample values ina sample block in a picture and in a neighboring sample block in thepicture based on i) whether illumination compensation is enabled for atleast one of the first and the second sample block. The sample block andthe neighboring sample block are separated in the picture by a blockboundary.

A further embodiment relates to a user equipment or device comprising adeblocking filtering control device according to the embodiments, avideo encoder according to the embodiments and/or a video decoderaccording to the embodiments. In a particular embodiment, the userequipment is selected from a group consisting of a video camera, acomputer, a laptop, a smart phone, a tablet, a game console and aset-top box.

FIG. 18 is a schematic block diagram of a user equipment 70 housing avideo decoder 60 with a deblocking filtering control device. The userequipment 70 can be any device having video decoding functions thatoperates on an encoded bitstream to thereby decode the bitstream andmake the video sequence available for display on a screen 74.Non-limiting examples of such devices include video cameras, mobiletelephones, smart phones and other portable video players, tablets, laptops, desktops, notebooks, personal video recorders, multimedia players,video streaming servers, set-top boxes, TVs, computers, decoders, gameconsoles, etc.

The user equipment 70 comprises a memory 72 configured to store encodedvideo data. The encoded video data can have been generated by the userequipment 70 itself. Alternatively, the encoded video data is generatedby some other device and wirelessly transmitted or transmitted by wireto the user equipment 70. The user equipment 70 then comprises atransceiver (transmitter and receiver) or I/O unit 71 to achieve thedata transfer.

The encoded video data is brought from the memory 72 to a video decoder60, such as the video decoder illustrated in FIG. 12. The video decoder60 comprises a deblocking filtering control device according to theembodiments. The video decoder 60 then decodes the encoded video datainto decoded pictures. The decoded pictures are provided to a videoplayer 73 that is configured to play out the decoded pictures as a videosequence on a screen 74 of or connected to the user equipment 70.

In FIG. 18, the user equipment 70 has been illustrated as comprisingboth the video decoder 60 and the video player 73, with the videodecoder 60 implemented as a part of the video player 73. This should,however, merely be seen as an illustrative but non-limiting example ofan implementation embodiment for the user equipment 70. Also distributedimplementations are possible where the video decoder 60 and the videoplayer 73 are provided in two physically separated devices are possibleand within the scope of user equipment 70 as used herein. The screen 74could also be provided as a separate device connected to the userequipment 70, where the actual data processing is taking place.

The user equipment 70 may also, or alternatively comprise a videoencoder 40, such as the video encoder of FIG. 11, comprising adeblocking filtering control device according to the embodiments. Thevideo encoder 40 is then configured to encode pictures received by theI/O unit 71 and/or generated by the user equipment 70 itself. In thelatter case, the user equipment 70 preferably comprises a video engineor video recorder, such as in the form of or connected to a videocamera.

The video encoder and/or video decoder of the embodiments mayalternatively be implemented in a network device or equipment being orbelonging to a network node in a communication network. Such a networkequipment may be a device for converting video according to one videocoding standard to another video coding standard, i.e., transcoding. Thenetwork equipment can be in the form of or comprised in a radio basestation, a Node-B or any other network node in a communication network,such as a radio-based network.

It is becoming increasingly popular to provide computing services,hardware and/or software, in network equipment, such as network devices,nodes and/or servers, where the resources are delivered as a service toremote locations over a network. By way of example, this means thatfunctionality, as described herein, can be distributed or re-located toone or more separate physical devices, nodes or servers. Thefunctionality may be re-located or distributed to one or more jointlyacting physical and/or virtual machines that can be positioned inseparate physical node(s), i.e., in the so-called cloud. This issometimes also referred to as cloud computing, which is a model forenabling ubiquitous on-demand network access to a pool of configurablecomputing resources such as networks, servers, storage, applications andgeneral or customized services.

FIG. 19 is a schematic diagram illustrating an example of howfunctionality can be distributed or partitioned between differentnetwork equipment in a general case. In this example, there are at leasttwo individual, but interconnected network equipment 300, 301, which mayhave different functionalities, or parts of the same functionality,partitioned between the network equipment 300, 301. There may beadditional network devices 302 being part of such a distributedimplementation. The network equipment 300, 301, 302 may be part of thesame wireless or wired communication system, or one or more of thenetwork devices may be so-called cloud-based network devices locatedoutside of the wireless or wired communication system.

FIG. 20 is a schematic diagram illustrating an example of a wirelesscommunication network or system, including an access network 81 and acore network 82 and optionally an operations and support system (OSS) 83in cooperation with one or more cloud-based network equipment 300. Thefigure also illustrates a user equipment 70 connected to the accessnetwork 81 and capable of conducting wireless communication with a basestation representing an embodiment of a network node 80.

The embodiments described above are to be understood as a fewillustrative examples of the present invention. It will be understood bythose skilled in the art that various modifications, combinations andchanges may be made to the embodiments without departing from the scopeof the present invention. In particular, different part solutions in thedifferent embodiments can be combined in other configurations, wheretechnically possible. The scope of the present invention is, however,defined by the appended claims.

REFERENCES

-   [1] ITU-T H.265 (04/2015) SERIES H: AUDIOVISUAL AND MULTIMEDIA    SYSTEMS, Infrastructure of audiovisual services Coding of moving    video, High efficiency video coding-   [2] 2.3.1 in Algorithm Description of Joint Exploration Test Model 6    (JEM 6), http://phenix.it-sudparis.eu/jvet/doc end user/documents/6    Hobartiwg11/JVET-F1001-v3.zip

The invention claimed is:
 1. A deblocking filtering control methodcomprising: deciding whether to apply deblocking filtering to samplevalues in a sample block in a picture and in a neighboring sample blockin said picture based on i) whether illumination compensation is enabledfor sample prediction values in a first prediction block in a referencepicture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block, said sample block and saidneighboring sample block being separated in said picture by a blockboundary, wherein the deciding whether to apply deblocking filteringcomprises deciding to apply deblocking filtering to said sample valuesin said sample block and in said neighboring sample block based onwhether illumination compensation is enabled for at least one of saidsample block and said neighboring sample block; deciding whether toapply strong deblocking filtering or weak deblocking filtering to saidsample values in said sample block and in said neighboring sample blockbased on whether illumination compensation is enabled for at least oneof said sample block and said neighboring sample block; and determininga value of at least one parameter selected from a group consisting ofparameters β and t_(c) based on whether illumination compensation isenabled for at least one of said sample block and said neighboringsample block; wherein the deciding whether to apply said strongdeblocking filtering or said weak deblocking filtering comprisesdeciding to apply said strong deblocking filtering to said sample valuesin said sample block and in said neighboring sample block if2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply said weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block, wherein p0_(i)denotes a sample value of a first sample, relative to said blockboundary, in a line i of samples in said sample block, p1_(i) denotes asample value of a second sample, relative to said block boundary, insaid line i of samples in said sample block, p2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said sample block, q0_(i) denotes a sample value of afirst sample, relative to said block boundary, in said line i of samplesin said neighboring sample block, q1_(i) denotes a sample value of asecond sample, relative to said block boundary, in said line i ofsamples in said neighboring sample block, and q2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said neighboring sample block.
 2. The deblocking filteringcontrol method according to claim 1, wherein the deciding whether toapply deblocking filtering comprises deciding whether to applydeblocking filtering to said sample values in said sample block and insaid neighboring sample block based on i) a value of a first LocalIllumination Compensation, LIC, parameter for said first predictionblock and/or ii) a value of a second LIC parameter for said secondprediction block.
 3. The deblocking filtering control method accordingto claim 2, wherein the deciding whether to apply deblocking filteringcomprises deciding whether to apply deblocking filtering to said samplevalues in said sample block and in said neighboring sample block basedon i) a value of a first LIC weighting factor for said sample predictionvalues of said first prediction block and ii) a value of a second LICweighting factor for said sample prediction values of said secondprediction block.
 4. The deblocking filtering control method accordingto claim 2, wherein the deciding whether to apply deblocking filteringcomprises deciding whether to apply deblocking filtering to said samplevalues in said sample block and in said neighboring sample block basedon i) a value of a first LIC additive offset for said sample predictionvalues of said first prediction block and ii) a value of a second LICadditive offset for said sample prediction values of said secondprediction block.
 5. The deblocking filtering control method accordingto claim 2, further comprising: comparing a first magnitude modificationof sample prediction values from the first LIC parameter and a secondmagnitude modification of sample prediction values from the second LICparameter, wherein: the first magnitude modification and the secondmagnitude modification include weights and/or offsets for the sampleprediction values; and deciding whether to apply deblocking filteringcomprises deciding whether to apply deblocking filtering to said samplevalues in said sample block and in said neighboring sample block basedon said comparison of said first magnitude modification of sampleprediction values and said second magnitude modification of sampleprediction values.
 6. The deblocking filtering control method accordingto claim 1, wherein the deciding whether to apply deblocking filteringcomprises: deciding that deblocking filtering may be applied to saidsample values in said sample block and in said neighboring sample blockif said first LIC parameter differs from said second LIC parameter withat least a threshold value; and deciding not to apply deblockingfiltering to said sample values in said sample block and in saidneighboring sample block if said first LIC parameter does not differfrom said second LIC parameter with at least said threshold value. 7.The deblocking filtering control method according to claim 1, furthercomprising: determining a value of a boundary strength parameter basedon whether illumination compensation is enabled, wherein the decidingwhether to apply deblocking filtering comprises deciding whether toapply deblocking filtering to said sample values in said sample blockand in said neighboring sample block based on said value of saidboundary strength parameter.
 8. A deblocking filtering control device,wherein said deblocking filtering control device is configured to:decide whether to apply deblocking filtering to sample values in asample block in a picture and in a neighboring sample block in saidpicture based on i) whether illumination compensation is enabled forsample prediction values in a first prediction block in a referencepicture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block, said sample block and saidneighboring sample block being separated in said picture by a blockboundary; decide whether to apply strong deblocking filtering or weakdeblocking filtering to said sample values in said sample block and insaid neighboring sample block based on whether illumination compensationis enabled for at least one of said sample block and said neighboringsample block; and determine a value of at least one parameter selectedfrom a group consisting of parameters β and t_(c) based on whetherillumination compensation is enabled for at least one of said sampleblock and said neighboring sample block; wherein said deblockingfiltering control device is configured to decide whether to apply saidstrong deblocking filtering or said weak deblocking filtering comprisesdeciding to apply said strong deblocking filtering to said sample valuesin said sample block and in said neighboring sample block if2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply said weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block, wherein p0_(i)denotes a sample value of a first sample, relative to said blockboundary, in a line i of samples in said sample block, p1_(i) denotes asample value of a second sample, relative to said block boundary, insaid line i of samples in said sample block, p2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said sample block, q0_(i) denotes a sample value of afirst sample, relative to said block boundary, in said line i of samplesin said neighboring sample block, q1_(i) denotes a sample value of asecond sample, relative to said block boundary, in said line i ofsamples in said neighboring sample block, and q2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said neighboring sample block.
 9. The deblocking filteringcontrol device according to claim 8, wherein said deblocking filteringcontrol device is configured to decide whether to apply deblockingfiltering to said sample values in said sample block and in saidneighboring sample block based on i) a value of a first LocalIllumination Compensation, LIC, parameter for said first predictionblock and/or ii) a value of a second LIC parameter for said secondprediction block.
 10. The deblocking filtering control device accordingto claim 9, wherein said deblocking filtering control device isconfigured to decide whether to apply deblocking filtering to saidsample values in said sample block and in said neighboring sample blockbased on i) a value of a first LIC weighting factor for said sampleprediction values of said first prediction block and ii) a value of asecond LIC weighting factor for said sample prediction values of saidsecond prediction block.
 11. The deblocking filtering control deviceaccording to claim 9, wherein said deblocking filtering control deviceis configured to decide whether to apply deblocking filtering to saidsample values in said sample block and in said neighboring sample blockbased on i) a value of a first LIC additive offset for said sampleprediction values of said first prediction block and ii) a value of asecond LIC additive offset for said sample prediction values of saidsecond prediction block.
 12. The deblocking filtering control deviceaccording to claim 9, wherein said deblocking filtering control deviceis further configured to: compare a first magnitude modification ofsample prediction values from the first LIC parameter and a secondmagnitude modification of sample prediction values from the second LICparameter, wherein: the first magnitude modification and the secondmagnitude modification include weights and/or offsets for the sampleprediction values; and said deblocking filtering control device isconfigured to decide whether to apply deblocking filtering to saidsample values in said sample block and in said neighboring sample blockbased on said comparison of said first magnitude modification of sampleprediction values and said second magnitude modification of sampleprediction values.
 13. The deblocking filtering control device accordingto claim 8, wherein said deblocking filtering control device isconfigured to: decide that deblocking filtering may be applied to saidsample values in said sample block and in said neighboring sample blockif said first LIC parameter differs from said second LIC parameter withat least a threshold value; and decide not to apply deblocking filteringto said sample values in said sample block and in said neighboringsample block if said first LIC parameter does not differ from saidsecond LIC parameter with at least said threshold value.
 14. Thedeblocking filtering control device according to claim 8, wherein saiddeblocking filtering control device is further configured to determine avalue of a boundary strength parameter based on whether illuminationcompensation is enabled, wherein said deblocking filtering controldevice is configured to decide whether to apply deblocking filtering tosaid sample values in said sample block and in said neighboring sampleblock based on said value of said boundary strength parameter.
 15. Thedeblocking filtering control device according to claim 8, comprising: aprocessor; and a memory comprising instructions executable by saidprocessor, wherein said processor is operative to: decide whether toapply deblocking filtering to said sample values in said sample blockand in said neighboring sample block based on i) whether illuminationcompensation is enabled for sample prediction values in said firstprediction block in said reference picture for said sample block and/orii) whether illumination compensation is enabled for sample predictionvalues in said second prediction block in said reference picture or theother reference picture for said neighboring sample block, said sampleblock and said neighboring sample block being separated in said pictureby said block boundary; decide whether to apply strong deblockingfiltering or weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block based on whetherillumination compensation is enabled for at least one of said sampleblock and said neighboring sample block; and determine said value of atleast one parameter selected from said group consisting of parameters βand t_(c) based on whether illumination compensation is enabled for atleast one of said sample block and said neighboring sample block;wherein said deblocking filtering control device is configured to decidewhether to apply said strong deblocking filtering or said weakdeblocking filtering comprises deciding to apply said strong deblockingfiltering to said sample values in said sample block and in saidneighboring sample block if2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply said weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block, wherein p0_(i)denotes said sample value of said first sample, relative to said blockboundary, in said line i of samples in said sample block, p1_(i) denotessaid sample value of said second sample, relative to said blockboundary, in said line i of samples in said sample block, p2_(i) denotessaid sample value of said third sample, relative to said block boundary,in said line i of samples in said sample block, q0_(i) denotes saidsample value of said first sample, relative to said block boundary, insaid line i of samples in said neighboring sample block, q1_(i) denotessaid sample value of said second sample, relative to said blockboundary, in said line i of samples in said neighboring sample block,and q2_(i) denotes said sample value of said third sample, relative tosaid block boundary, in said line i of samples in said neighboringsample block.
 16. A deblocking filtering control device comprising adecision module for: deciding whether to apply deblocking filtering tosample values in a sample block in a picture and in a neighboring sampleblock in said picture based on i) whether illumination compensation isenabled for sample prediction values in a first prediction block in areference picture for said sample block and/or ii) whether illuminationcompensation is enabled for sample prediction values in a secondprediction block in said reference picture or another reference picturefor said neighboring sample block, said sample block and saidneighboring sample block being separated in said picture by a blockboundary, wherein the deciding whether to apply deblocking filteringcomprises deciding to apply deblocking filtering to said sample valuesin said sample block and in said neighboring sample block based onwhether illumination compensation is enabled for at least one of saidsample block and said neighboring sample block; deciding whether toapply strong deblocking filtering or weak deblocking filtering to saidsample values in said sample block and in said neighboring sample blockbased on whether illumination compensation is enabled for at least oneof said sample block and said neighboring sample block; and determininga value of at least one parameter selected from a group consisting ofparameters β and t_(c) based on whether illumination compensation isenabled for at least one of said sample block and said neighboringsample block; wherein the deciding whether to apply said strongdeblocking filtering or said weak deblocking filtering comprisesdeciding to apply said strong deblocking filtering to said sample valuesin said sample block and in said neighboring sample block if2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply said weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block, wherein p0_(i)denotes a sample value of a first sample, relative to said blockboundary, in a line i of samples in said sample block, p1_(i) denotes asample value of a second sample, relative to said block boundary, insaid line i of samples in said sample block, p2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said sample block, q0_(i) denotes a sample value of afirst sample, relative to said block boundary, in said line i of samplesin said neighboring sample block, q1_(i) denotes a sample value of asecond sample, relative to said block boundary, in said line i ofsamples in said neighboring sample block, and q2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said neighboring sample block.
 17. A non-transitorycomputer-readable storage medium comprising a computer program productcomprising instructions, which when executed by at least one processor,cause said at least one processor to: decide whether to apply deblockingfiltering to sample values in a sample block in a picture and in aneighboring sample block in said picture based on i) whetherillumination compensation is enabled for sample prediction values in afirst prediction block in a reference picture for said sample blockand/or ii) whether illumination compensation is enabled for sampleprediction values in a second prediction block in said reference pictureor another reference picture for said neighboring sample block, saidsample block and said neighboring sample block being separated in saidpicture by a block boundary; decide whether to apply strong deblockingfiltering or weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block based on whetherillumination compensation is enabled for at least one of said sampleblock and said neighboring sample block; and determine a value of atleast one parameter selected from a group consisting of parameters β andt_(c) based on whether illumination compensation is enabled for at leastone of said sample block and said neighboring sample block; wherein saiddeblocking filtering control device is configured to decide whether toapply said strong deblocking filtering or said weak deblocking filteringcomprises deciding to apply said strong deblocking filtering to saidsample values in said sample block and in said neighboring sample blockif 2×(|p2_(i)−2p1_(i)+p0_(i)|+|q2_(i)−2q1_(i)+q0_(i)|)<(β>>2),|p3_(i)−p0_(i)|+|q3_(i)−q0_(i)|<(β>>3) and|p0_(i)−q0_(i)|<((5×t_(c)+1)>>1), wherein i=0, 3, and otherwise decidingto apply said weak deblocking filtering to said sample values in saidsample block and in said neighboring sample block, wherein p0_(i)denotes a sample value of a first sample, relative to said blockboundary, in a line i of samples in said sample block, p1_(i) denotes asample value of a second sample, relative to said block boundary, insaid line i of samples in said sample block, p2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said sample block, q0_(i) denotes a sample value of afirst sample, relative to said block boundary, in said line i of samplesin said neighboring sample block, q1_(i) denotes a sample value of asecond sample, relative to said block boundary, in said line i ofsamples in said neighboring sample block, and q2_(i) denotes a samplevalue of a third sample, relative to said block boundary, in said line iof samples in said neighboring sample block.